﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.Mvc;

namespace Adams.Admin.Presentation
{
    public class AppendLayoutViewModel
    {
    }

    public class AppendLayoutViewModelAttribute : ActionFilterAttribute
    {
        public override void OnActionExecuting(ActionExecutingContext filterContext)
        {
            int userId = filterContext.HttpContext.User.Identity.Name.ToInt();
            filterContext.Controller.ViewBag.Layout = Business.Console.Layout.LayoutPageLoad(userId);
            base.OnActionExecuting(filterContext);
        }
    }
}